package com.ruoyi;

import cn.hutool.core.util.CharsetUtil;
import cn.hutool.crypto.SmUtil;
import cn.hutool.crypto.symmetric.SymmetricCrypto;
import com.alibaba.excel.annotation.ExcelProperty;
import net.sourceforge.tess4j.ITesseract;
import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;

/**
 * @author Mr
 * @description TODO
 * @date 2023-04-13 17:02
 */
public class TestMain {

    public static void main(String[] args) throws TesseractException {
        ITesseract instance = new Tesseract();  // JNA Interface Mapping
        instance.setDatapath("src/main/resources/tessdata"); // path to tessdata directory
        instance.setLanguage("chi_sim");
        String result = instance.doOCR(new File("/Users/maxiaopao/Desktop/WechatIMG42.png"));
        System.out.println(result);

    }

}
